feat: UX testing framework and neo4j import shadowing fix#36
Merged
Conversation
## UX Testing & Demo Preparation - Add comprehensive UX testing checklist (dev/ux-testing-checklist.md) - Page-by-page testing scenarios for all 9 pages - Core workflows, edge cases, and UX polish checks - Status tracking (✅/⚠️ /❌/🔲) for each page - Demo readiness checklist - Gap tracking for prioritizing issues - Add demo setup guide (DEMO_SETUP.md) - Step-by-step startup instructions - Page navigation reference - Test data creation methods - Common demo workflows - Troubleshooting guide - Configuration steps for Neo4j, interpreters, rclone - Update documentation - README.md: Add "Testing & Demo" section - dev/prompts.md: Add UX testing workflow ## Neo4j Import Shadowing Fix - Fix: Create scidk/__main__.py to remove cwd from sys.path - Prevents local neo4j/ test stub from shadowing real package - Allows `python -m scidk` to work correctly - Fix: Update pyproject.toml to exclude neo4j* and tests* from package - Prevents test stubs from being included in builds - Fix: Document neo4j stub purpose in .gitignore - Clarify it's a test stub that can cause runtime issues - Document issue and solution in dev/reports/neo4j-import-issue-fix.md - Root cause analysis - Why scidk-serve works vs python -m scidk.app - Testing verification ## Technical Details The local neo4j/ directory contains a test stub for mocking in unit tests. When using `python -m scidk.app`, Python adds cwd to sys.path[0], causing the stub to shadow the real neo4j package. This resulted in: - Error: "type object 'GraphDatabase' has no attribute 'driver'" - HTTP 502 when connecting to Neo4j in Settings Solutions (in order of preference): 1. ✅ Use `scidk-serve` (console script, no path issues) 2. ✅ Use `python -m scidk` (now includes __main__.py that fixes path) 3. ❌ Don't use `python -m scidk.app` (adds cwd, causes shadowing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive UX testing framework for demo preparation and fixes Neo4j connection issue caused by import path shadowing.
UX Testing & Demo Preparation
New Documentation
dev/ux-testing-checklist.md- Comprehensive page-by-page testing guideDEMO_SETUP.md- Quick start guide for running and testing the appUpdated existing docs
README.md: Added "Testing & Demo" sectiondev/prompts.md: Added UX testing workflowTesting Workflow
DEMO_SETUP.mddev/ux-testing-checklist.mdpage by pageNeo4j Import Shadowing Fix
The Problem
When starting the app with
python -m scidk.app, Neo4j connections failed with:type object 'GraphDatabase' has no attribute 'driver'However,
scidk-serveworked fine.Root Cause
neo4j/test stub directory was shadowing the real neo4j packagepython -m scidk.appadds current directory tosys.path[0].venv/lib/python3.x/site-packages/GraphDatabaseclass withoutdrivermethodSolution Implemented
scidk/__main__.pythat removes cwd from sys.path before importingpyproject.tomlto excludeneo4j*andtests*from package builds.gitignoredev/reports/neo4j-import-issue-fix.mdRecommended Usage (Priority Order)
scidk-serve- Best, console script entry pointpython -m scidk- Works with new__main__.pyfixpython -m scidk.app- Avoid, causes shadowing issueTesting
Manual Testing
scidk-servepython -m scidkGraphDatabase.driverattribute is accessibleE2E Tests
__main__.pyFiles Changed
New Files
DEMO_SETUP.md- Demo setup and troubleshooting guidescidk/__main__.py- Fixes import path forpython -m scidkdev/ux-testing-checklist.md- Comprehensive UX testing guidedev/reports/neo4j-import-issue-fix.md- Technical analysisModified Files
.gitignore- Document neo4j stub purposeREADME.md- Add Testing & Demo sectionpyproject.toml- Exclude test stubs from packagedev/prompts.md- Add UX testing workflowRelated Issues
Resolves the Neo4j 502 connection error discovered during demo preparation.
Next Steps
After merge:
DEMO_SETUP.mdto start the appdev/ux-testing-checklist.mdsystematically🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com